
const Mock = require('mockjs')


const Random = Mock.Random

function getComponentList() {
    return [
        {
            fe_id: 'c1',
            type: 'questionInfo',
            title: "问卷信息",
            isHidden: false,
            isLocked: false,
            props: {
                title: "问卷信息",
                desc: "问卷描述",
            }
        },
        // Title
        {
            fe_id: 'c2',
            type: 'questionTitle',
            title: '标题',
            isHidden: false,
            isLocked: false,
            props: {
                text: "一行标题",
                level: 1,
                isCenter: false,
            }
        },
        // Input
        {
            fe_id: 'c3',
            type: "questionInput",
            title: '输入框1',
            isHidden: false,
            isLocked: false,
            props: {
                title: "你的姓名",
                placeholder: "请输入你的姓名"
            }
        },
        {
            fe_id: 'c4',
            type: "questionInput",
            title: '输入框2',
            isHidden: false,
            props: {
                title: "你的电话",
                placeholder: "请输入你的电话"
            }
        },
        // Textarea 
        {
            fe_id: 'c5',
            type: "questionTextarea",
            title: "多行输入",
            isHidden: false,
            isLocked: false,
            props: {
                title: "你的留言",
                placeholder: "请输入你的留言"
            }
        },
        // Paragraph
        {
            fe_id: 'c6',
            type: 'questionParagraph',
            title: '段落',
            isHidden: false,
            isLocked: false,
            props: {
                text: "一段文字\n一段文字",
                isCenter: false,
            }
        },
        // Radio
        {
            fe_id: 'c7',
            type: "questionRadio",
            title: '单选框',
            isHidden: false,
            isLocked: false,
            props: {
                title: "你的性别",
                options: [
                    {
                        text: "男",
                        value: "male"
                    },
                    {
                        text: "女",
                        value: "female"
                    }
                ]
            }
        },
        // Checkbox
        {
            fe_id: 'c8',
            type: "questionCheckbox",
            title: '多选框',
            isHidden: false,
            isLocked: false,
            props: {
                title: "你的爱好",
                list: [
                    {
                        text: "打游戏1",
                        value: "game1",
                        checked: true
                    },
                    {
                        text: "打游戏2",
                        value: "game2",
                        checked: false
                    },
                    {
                        text: "打游戏3",
                        value: "game3",
                        checked: false
                    }
                ]
            }
        },
    ]
}

module.exports = getComponentList